
// <copyright file="PerfCounterCategoryAttribute.cs" company="Subhadra Software Solutions">
//   
// </copyright>
// <summary>
//   The perf counter category attribute.
// </summary>

namespace SubhadraSolutions.Sharp.Utils.Diagnostics.Performance
{
    using System;

    /// <summary>
    /// The perf counter category attribute.
    /// </summary>
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = false, Inherited = true)]
    public sealed class PerfCounterCategoryAttribute : Attribute
    {
        #region Constructors and Finalizers

        /// <summary>
        /// Initializes a new instance of the <see cref="PerfCounterCategoryAttribute"/> class.
        /// </summary>
        /// <param name="categoryName">
        /// The category name.
        /// </param>
        /// <param name="categoryHelp">
        /// The category help.
        /// </param>
        public PerfCounterCategoryAttribute(string categoryName, string categoryHelp)
        {
            this.CategoryName = categoryName;
            this.CategoryHelp = categoryHelp;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="PerfCounterCategoryAttribute"/> class.
        /// </summary>
        /// <param name="categoryName">
        /// The category name.
        /// </param>
        public PerfCounterCategoryAttribute(string categoryName)
            : this(categoryName, categoryName)
        {
        }

        #endregion Constructors and Finalizers

        #region Public Properties

        /// <summary>
        /// Gets the category help.
        /// </summary>
        public string CategoryHelp { get; private set; }

        /// <summary>
        /// Gets the category name.
        /// </summary>
        public string CategoryName { get; private set; }

        #endregion Public Properties
    }
}
